/*
 * Copyright (c)e 2024-2024.Powered by 清明雨揽月
 * This software is licensed under Mulan PSL v2.
 * You can use this software according to the terms and conditions of the Mulan
 * PSL v2.
 * You may obtain a copy of Mulan PSL v2 at:
 *          http://license.coscl.org.cn/MulanPSL2
 * THIS SOFTWARE IS PROVIDED ON AN 'AS IS' BASIS, WITHOUT WARRANTIES OF ANY
 * KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
 * NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PSL v2 for more details.
 */

#ifndef DATASTRUCTURES_SEQUENCE_STACK_H
#define DATASTRUCTURES_SEQUENCE_STACK_H
#define MAX_SIZE 10

typedef struct SQ_STACK
{
    int data[MAX_SIZE];
    int top;
} sq_stack;

class sequence_stack
{
public:
    void init_stack();

    bool stack_empty() const;

    bool push(int data);

    bool pop();

    bool get_top() const;

    void destroy_stack();

    void operate();

private:
    sq_stack _sq_stack{};
    int arr[MAX_SIZE] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
};

#endif // DATASTRUCTURES_SEQUENCE_STACK_H
